//
//  OrderPackageCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/7/28.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "OrderPackageCell.h"

@implementation OrderPackageCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)fillCellWithModel:(PackageDetailModule *)model {
    
    self.storeNameLab.text = model.sellerModel.sellerName;
    
    if (model.bannerPics.count > 0) {
        [self.packageMainImageView sd_setImageWithURL:[NSURL URLWithString:model.bannerPics.firstObject] placeholderImage:[UIImage imageNamed:@"placeholder"]];
    }
    
    self.packageMainTitleLab.text = model.sellerGoodsModel.goodsName;
    self.packagePriceLab.text = [NSString stringWithFormat:@"¥%@",[Utilities changeDoubleToString:model.sellerGoodsModel.goodsActivePrice]];
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self.packageMainImageView pp_clipCorners:UIRectCornerAllCorners radius:8];
    });

}

@end
